//
//  CategoryLeftCell.m
//  NormalFramework
//
//  Created by beisheng03 on 2018/3/12.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "CategoryLeftCell.h"

@interface CategoryLeftCell ()
/** <#note#> */
@property (nonatomic, weak) UILabel *nameLabel;
/** <#note#> */
@property (nonatomic, weak) UIView *markView;
@end

@implementation CategoryLeftCell

- (void)awakeFromNib {
    [super awakeFromNib];
    UILabel *temp = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 60, 40)];
    self.nameLabel = temp;
    self.nameLabel.text = @"";
    self.nameLabel.numberOfLines = 0;
    self.nameLabel.font = MYFONT(14);
    self.nameLabel.textColor = [UIColor blackColor];
    self.nameLabel.highlightedTextColor = themeColor;
    [self.contentView addSubview:self.nameLabel];
    
    
    
    UIView *tempMark = [[UIView alloc] initWithFrame:CGRectMake(0, 5, 5, 45)];
    self.markView = tempMark;
    self.markView.backgroundColor = themeColor;
    [self.contentView addSubview:self.markView];
    // Initialization code
}

- (void)setModel:(GoodsCateModel *)model{
    
    _model = model;
    
    self.nameLabel.text = _model.category_name;
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    //[UIColor colorWithWhite:0 alpha:0.1]
    self.contentView.backgroundColor = selected ? [UIColor whiteColor] : viewBgGrey;
    self.highlighted = selected;
    self.nameLabel.highlighted = selected;
    self.markView.hidden = !selected;

    // Configure the view for the selected state
}

@end
